#!/usr/bin/env python
# -*- coding: utf-8 -*-
# title       :
# author      : jarry
import os
from .InitQtModule import *
# import AovListWidget as AovListWidget
from .AovListWidget import AovListWidget
from . import __file__ as _initpy_file

__CURRENT_PATH__ = os.path.dirname(os.path.realpath(_initpy_file))


class AOVAvailableWidget(QWidget):

    def __init__(self, parent=None, project=''):
        super(AOVAvailableWidget, self).__init__(parent)
        self.setObjectName('AOVAvailableWidget')

        self.setMinimumWidth(200)

        main_layout = QVBoxLayout()
        main_layout.setSpacing(5)
        main_layout.setContentsMargins(0, 0, 0, 0)
        label = QLabel('Available AOVs')

        button_layout = QHBoxLayout()
        self.add_button = QPushButton('Add Custom')
        # remove_button = QPushButton('<<')
        button_layout.addWidget(self.add_button)
        self.list_widget = AovListWidget(self)
        # button_layout.addWidget(remove_button)

        # check_layout = QHBoxLayout()
        # merge_cbx = QCheckBox('Merge AOVs')
        # half_cbx = QCheckBox('Half Precision')
        # check_layout.addWidget(merge_cbx)
        # check_layout.addWidget(half_cbx)

        # group_layout = QHBoxLayout()
        # group_label = QLabel('GroupName')
        # group_edit = QLineEdit()
        # group_layout.addWidget(group_label)
        # group_layout.addWidget(group_edit)

        main_layout.addWidget(label)
        main_layout.addWidget(self.list_widget)
        main_layout.addLayout(button_layout)
        # main_layout.addLayout(check_layout)
        # main_layout.addLayout(group_layout)

        self.setLayout(main_layout)


if __name__ == "__main__":
    app = QApplication([])
    my_ui = AOVAvailableWidget()
    my_ui.show()
    app.exec_()
